Some operating systems allow a user to designate certain files to be available for offline use. When the user is connected to a server that hosts the files, the user's machine accesses the files from the server. When the user is not connected to the server, the user's machine obtains a cached copy of the files from a data store that is local to the user's machine. Later, when the user's machine is reconnected to the server, the cached copies of the files on the user's machine are synchronized with the copies of the files stored on the server. The above mechanism works well when only files are involved but has issues when directories are involved. In particular, when directories are involved, a user is not allowed to delete or rename a cached directory while the user's machine is offline.